<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>table rows</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<script type="text/javascript">
function toggle() {
var aTR=document.getElementsByTagName('tr');
var cTR=document.getElementById('chk');
var show=(document.all)? 'block' : 'table-row';
for(var i=0; i<50; i++) {
//aTR[i].style.display=(aTR[i].style.display=='none')? show : 'none';
	aTR[i].style.display=(cTR[i].checked)? show : 'none';
	cTR[i].checked = !cTR[i].checked;
}
}
</script>

</head>
<body>
<table border="1" cellpadding="0" cellspacing="0" summary="">
<tbody>
<tr><td><button type="button" onclick="toggle();">toggle rows</button></td><td>1</td></tr>
<tr><td><input id="chk" type="checkbox" checked></td><td>2</td></tr>
<tr><td><input id="chk" type="checkbox" ></td><td>3</td></tr>
<tr><td><input id="chk" type="checkbox" checked></td><td>4</td></tr>
<tr><td><input id="chk" type="checkbox" checked></td><td>5</td></tr>
</tbody>
</table>
</body>
</html>